home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / DEMON / RISCOS2 / ARCKA9Q1.ARC / h / IFACE < prev    next >
Text File  |  1992-02-14  |  2KB  |  30 lines

  1. /* Interface control structure */
  2. struct interface {
  3.         struct interface *next; /* Linked list pointer */
  4.         char *name;             /* Ascii string with interface name */
  5.         int16 mtu;              /* Maximum transmission unit size */
  6.         int (*ioctl)();         /* Function to handle device control */
  7.         int (*send)();          /* Routine to send an IP datagram */
  8.         int (*output)();        /* Routine to send link packet */
  9.         int (*raw)();           /* Routine to call to send raw packet */
  10.         void (*recv)();         /* Routine to kick to process input */
  11.         int (*stop)();          /* Routine to call before detaching */
  12.         int16 dev;              /* Subdevice number to pass to send */
  13.         int16 flags;            /* Configuration flags */
  14. #define DATAGRAM_MODE   0       /* Send datagrams in raw link frames */
  15. #define CONNECT_MODE    1       /* Send datagrams in connected mode */
  16.         int16 trace;            /* Trace flags */
  17. #define IF_TRACE_OUT    0x01    /* Output packets */
  18. #define IF_TRACE_IN     0x10    /* Packets to me except broadcast */
  19. #define IF_TRACE_ASCII  0x100   /* Dump packets in ascii */
  20. #define IF_TRACE_HEX    0x200   /* Dump packets in hex/ascii */
  21.         char *hwaddr;           /* Device hardware address, if any */
  22.         struct interface *forw; /* Forwarding interface for output, if rx only */
  23. };
  24. #define NULLIF  (struct interface *)0
  25. extern struct interface *ifaces;        /* Head of interface list */
  26.  
  27. struct interface *if_lookup(char *);
  28. int doforward(int, char **);
  29.  
  30.